<?php
/**
 * 配置
 * 
 * @version $Id: main.php 258 2012-04-10 14:40:03Z linsir123 $
 */
return array(
	'urlMode' => URL_REWRITE,
	'controllerDefault' => 'site',
	'controllerMiss' => array('site', 'miss'),
	'subApps' => array('admin', 'user'),
	'view' => array('engine'=>'Smarty','caching'=>1, 'cache_lifetime'=>3600*24*3),
	'routes' => array(
		// 分类, list/分类名称/分类ID-关键字-排序-页码
		array(
			'pattern' => '/^list\/(.+)\/(\d+)-(.*?)-(.*?)-(.*?)-(\d+)-(\d+)$/i',
			'keys' => array('pinyin', 'cid', 'keyword', 'start_price', 'end_price', 'sort', 'p'),
			'route' => 'items/list'
		),
		
		// 商铺
		array(
			'pattern' => '/^shop\/(.+)\/(\d+)-(.*?)-(.*?)-(.*?)-(\d+)-(\d+)$/i',
			'keys' => array('nick', 'cid', 'keyword', 'start_price', 'end_price', 'sort', 'p'),
			'route' => 'items/shop'
		),
		
		// 商品
		array(
			'pattern' => '/^item\/(\d+)$/i',
			'keys' => array('iid'),
			'route' => 'item/info'
		),
		
		// 页面跳转
		array(
			'pattern' => '/^goto\/(\S+)\/(.*)$/i',
			'keys' => array('action', 'data'),
			'route' => 'url/page'
		),
		
		// 图片跳转
		array(
			'pattern' => '/^photo\/(\S+)\/(.*)$/i',
			'keys' => array('action', 'data'),
			'route' => 'url/photo'
		)
	),
	'dsn' => array(
		array('127.0.0.1', 'root', '123456', 'e35go'),
	),
	'dbTable' => array(
		array('prefix' => 'e35go_'),
	),
);
